<?php echo $this->fetch('header.html'); ?>
<header class="index-header">
    <div class="relative">
    <div class="jd-search-box-cover" style="opacity: 0;"></div>
        <div class="header_w">
            <div class="header-logo">
                <a href="index.php"><img src="<?php echo $this->_var['site_url']; ?>/<?php echo $this->_var['wap_site_logo']; ?>" class="logo"/></a>
                <div class="search">
                    <div class="search-box">
                        <form>
						<div style="position: absolute;top:0;left:3px;z-index: 9999;background:#fff;width:40px;">
						<ul class='top-search-tab' style='height:30px;overflow:hidden;border-right:1px solid #ddd;padding:0px 5px;z-index:99'>
							<li act='index'>商品</li>
							<li act='store'>店铺</li>
						  
						</ul>
						<span class="iconfont" style="position:absolute;right:0;top:0;font-size:12px;-webkit-transform:scale(0.5,0.5); ">&#xf0118;</span>
						</div>
                            <input type="hidden" name="app" value="search"/>
                            <input type="hidden" name="act" value="index"/>
                            <input type="text" name="keyword"  value="" placeholder="关键词" class="keyword" />
                            <input type="submit" class="iconfont btn" value="&#xf00d9;" />
                        </form>
                    </div>
                </div>
                <a href="index.php?app=member" class="iconfont member"><?php if (! $this->_var['visitor']['user_id']): ?>登录<?php else: ?><span class="icon">&#xf00f3;</span><?php endif; ?></a>
            </div>
        </div>
    </div>
    </header>
<script>
            $(function(){
                $(".top-search-tab li").click(function(){

                    $(".top-search-tab").css('height','auto');
            
                    $(".top-search-tab").prepend($(this));
                    $("input[name=act]").val($(this).attr('act'));
                    setTimeout(function(){
                        $(".top-search-tab").animate({height:'30px'});
                    },3000);
                });

            <?php if ($_GET['act'] == 'store'): ?>
            $(".top-search-tab li:eq(1)").click();
            $(".top-search-tab").css('height','30px');
            <?php endif; ?>
        
            <?php if ($_GET['act'] == 'groupbuy'): ?>
            $(".top-search-tab li:eq(2)").click();
            $(".top-search-tab").css('height','30px');
            <?php endif; ?>
            })

        </script>
<script>
    $(function(){
        $(window).scroll(function(){
            if($(window).scrollTop()<140){
                $(".jd-search-box-cover").css('opacity',(0.85*$(window).scrollTop()/140));
            }else{
                $(".jd-search-box-cover").css('opacity','0.85');
            }
        });
    })
</script>
<div class="col-0" area="col-0" data-position="0" widget_type="area">
            <?php $this->display_widgets(array('page'=>'index','area'=>'col-0')); ?>
</div>
<?php if ($this->_var['wap_recommended_goods']): ?>
<section id="recommended_goods">
    <div class="gray-text"><span class="gray-layout"><span class="gray-text-img iconfont">&#xf011e;</span>为您推荐</span></div>
    <ul class="row">
        <?php $_from = $this->_var['wap_recommended_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');$this->_foreach['fe_goods'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_goods']['total'] > 0):
    foreach ($_from AS $this->_var['goods']):
        $this->_foreach['fe_goods']['iteration']++;
?>
        <a href="<?php echo url('app=goods&id=' . $this->_var['goods']['goods_id']. ''); ?>">
            <li class="clearfix">
                <div class='similar-product'>
                <img class="lazyload" initial-url="<?php echo $this->_var['site_url']; ?>/<?php echo $this->_var['goods']['default_image']; ?>">
                <div class="info">
                    <span class="title"><?php echo htmlspecialchars($this->_var['goods']['goods_name']); ?></span>
                    <span class="price"><?php echo $this->_var['currency']; ?><span class="big-price"><?php echo $this->_var['goods']['price_array']['0']; ?></span><span class="small-price">.<?php echo ($this->_var['goods']['price_array']['1'] == '') ? '0' : $this->_var['goods']['price_array']['1']; ?></span></span>
                </div>
                </div>
            </li>
        </a>
        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        <div style="clear:both;height:0; display:block; overflow:hidden"></div>
    </ul>
</section>
<?php endif; ?>

<?php echo $this->fetch('footer.html'); ?>